package concurrent.chapter02_01;

/**
 * @Comment:多线程循环顺序执行
 * @Author:Shem
 * @Date:2019/5/25
 */
public class Main {

    public static void main(String[] args) {
        String[] threadNames = {"a", "b", "c"};
        PrintTask task = new PrintTask(threadNames, 1);
        Thread[] threads = new Thread[threadNames.length];
        for (int i = 0; i < threads.length; i++) {
            threads[i] = new Thread(task, threadNames[i]);
            threads[i].start();
        }
    }
}
